UseTrackedStateType
import { UseTrackedStateType } from "@hyper-fetch/react"
Description
Defined in react/src/helpers/use-tracked-state/use-tracked-state.types.ts:36
Preview
type UseTrackedStateType<T> = {
additionalData: ExtractAdapterAdditionalDataType<ExtractAdapterType<T>>;
data: null | ExtractResponseType<T>;
error: null | ExtractErrorType<T>;
isSuccess: boolean;
loading: boolean;
retries: number;
status: ExtractAdapterStatusType<ExtractAdapterType<T>>;
timestamp: null | Date;
}
Structure
{
additionalData: T extends BaseAdapterType<any, any, any, infer A, any> ? A : never;
data: null | T extends Request<infer D, any, any, any, any, any, any, any, any, any> ? D : never;
error: null | T extends Request<any, any, any, infer G, infer L, any, any, any, any, any> ? \G\ | \L\ : never;
isSuccess: boolean;
loading: boolean;
retries: number;
status: T extends BaseAdapterType<any, any, infer S, any, any> ? S : never;
timestamp: null | Date;
}